package com.beesphere.excel.reader.validation.tests;

import java.nio.charset.Charset;

import com.beesphere.xsd.validator.XsdValidator;

public class BasicValidatorTest {
	public static void main (String [] args) throws Exception {
		String outputFile = "files/toValidate.xml";
		/*OutputStream output = new FileOutputStream (outputFile);
		Map<String, String> tags = new HashMap<String, String> ();
		tags.put("sh", "data");
		ExcelToXmlConverter reader = new ExcelToXmlConverter (output) {

			private static final long serialVersionUID = 3680140825998114635L;

			@Override
			public boolean isSheetWithHeader(int sheetIndex) {
				return true;
			}
			
		};
		String[] xmlns = new String[] {
				"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"",
				"xmlns:xls=\"http://www.beesphere.net/xsds/2008/xls\""
		};
		reader.setXmlns(xmlns);
		reader.setSheetIndex(0);
		reader.setNamespace("xls");
		reader.setTags(tags);
		reader.setCharset (Charset.defaultCharset());
		reader.read (new FileInputStream ("files/in.xls"));
		output.close();*/
		
		
		String xsdFile = "files/4columns.xsd";
		
		XsdValidator.validate(outputFile, xsdFile, Charset.defaultCharset().name());
		
	}
}
